package com.joelemon.mockinfluxdbdata.core.config;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.joelemon.mockinfluxdbdata.enums.CommonFlag;
import com.joelemon.mockinfluxdbdata.enums.RunningFlag;
import org.apache.ibatis.annotations.Select;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.List;

/**
 * @Description: mock任务
 * @Author: HJY
 * @Date: 2023/11/20
 */
@Component
public interface MockTaskMapper extends BaseMapper<MockTask> {

    @Select("SELECT * FROM mock_task WHERE status = #{runningFlag} and force_stop = #{forceStop}")
    List<MockTask> queryAllByStatus(RunningFlag runningFlag, CommonFlag forceStop);
}
